package de.fstyle.android.worldcanvas.fragments;

import android.app.Dialog;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;

// Define a DialogFragment that displays the error dialog
public class ProxyDialogFragment extends DialogFragment {
	
	// Global field to contain the error dialog
	private Dialog dialog;

	// Default constructor. Sets the dialog field to null
	public ProxyDialogFragment() {
		super();
		this.dialog = null;
	}

	// Set the dialog to display
	public void setDialog(Dialog dialog) {
		this.dialog = dialog;
	}

	// Return a Dialog to the DialogFragment.
	@Override
	public Dialog onCreateDialog(Bundle savedInstanceState) {
		return dialog;
	}
}